<div class="panel panel-default mt20">
    <div class="panel-body">
        <div class="col-sm-12">
            <div class="row ">
                <div class="col-sm-2">
                    <input type="text" class="form-control" ng-model="searchform.name"  placeholder="名称">
                </div>
                <div class="col-sm-2">
                    <ui-select ng-model="searchform.type" theme="bootstrap" >
                         <ui-select-match placeholder="场所类别">
                             {{$select.selected.name}}
                         </ui-select-match>
                         <ui-select-choices repeat="item.value as item in typearr | filter: $select.search">
                             <span ng-bind-html="item.name | highlight: $select.search"></span>
                         </ui-select-choices>
                     </ui-select>
                 </div>
                <div class="col-sm-2 pull-right">
                    <button class="btn btn-block btn-success" ng-click="create()">创建</button>
                </div>
                <div class="col-sm-2 pull-right">
                    <button class="btn btn-block btn-info" ng-click="sousuo()">立即搜索</button>
                </div>
            </div>
        </div>
    </div>
               
        </div>
    </div>
</div>
<!-- searchArea -->

<div class="panel panel-default mt20">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="col-md-3 text-center">名称</th>
                    <th class="col-md-2 text-center">类型</th>
                    <th class="col-md-1 text-center">星级</th>
                    <th class="col-md-1 text-center">排序</th>
                    <th class="col-md-2 text-center">状态</th>
                    <th class="col-md-3 text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="obj in objs">
                    <td class="text-center">{{obj.name}}</td>
                    <td class="text-center">
                        <p ng-if="obj.type == 'M'">商户</p>
                        <p ng-if="obj.type == 'J'">景区</p>
                        <p ng-if="obj.type == 'H'">酒店</p>
                        <p ng-if="obj.type == 'T'">交通</p>
                        <p ng-if="obj.type == 'S'">商场</p>
                        
                    </td>
                    <td class="text-center">{{obj.star}}</td>
                    <td class="text-center">{{obj.asort}}</td>
                    <td class="text-center">
                        <p ng-if="obj.book == '1'">不可预定</p>
                        <p ng-if="obj.book == '0'">可预订</p>
                    </td>
                    <td class="text-left">
                        <a ng-click="edit(obj.id, obj.type)" class="btn btn-success btn-xs">编辑</a>
                        <a ng-click="adddish(obj.id)" class="btn btn-primary btn-xs">添加产品</a>
                        <a ng-click="relate(obj.id, obj.name, obj.type, obj.code)" ng-if="obj.book == '0'" class="btn btn-info btn-xs">关联</a>
                        <a ng-click="delete(obj.id)" class="btn btn-danger btn-xs">删除</a>
                        <a ng-click="useOrNoUse(obj.id, obj.state, obj.book, obj.code)" ng-if="obj.state == '1'" class="btn btn-warning btn-xs" style="background-color:blueviolet">停用</a>
                        <a ng-click="useOrNoUse(obj.id, obj.state, obj.book, obj.code)" ng-if="obj.state == '0'" class="btn btn-warning btn-xs">启用</a>
                    </td>
                </tr>
            </tbody>
        </table>


        <div class="text-right">

                <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="getlist()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>

        </div>


    </div>
</div>